# Generated by Django 4.0.4 on 2022-05-19 21:30

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Courses',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Создан')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Обновлён')),
                ('deleted', models.BooleanField(default=False, verbose_name='Удалён')),
                ('name', models.CharField(max_length=256, verbose_name='Name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Описание')),
                ('description_as_markdown', models.BooleanField(default=False, verbose_name='As markdown')),
                ('cost', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='Цена')),
                ('cover', models.CharField(default='no_image.svg', max_length=25, verbose_name='Обложка')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Создан')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Обновлён')),
                ('deleted', models.BooleanField(default=False, verbose_name='Удалён')),
                ('title', models.CharField(max_length=256, verbose_name='Title')),
                ('preambule', models.CharField(max_length=1024, verbose_name='Вступление')),
                ('body', models.TextField(blank=True, null=True, verbose_name='Наполнение')),
                ('body_as_markdown', models.BooleanField(default=False, verbose_name='As markdown')),
            ],
            options={
                'verbose_name': 'новость',
                'verbose_name_plural': 'новости',
                'ordering': ('-created_at', '-updated_at'),
            },
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Создан')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Обновлён')),
                ('deleted', models.BooleanField(default=False, verbose_name='Удалён')),
                ('num', models.PositiveIntegerField(verbose_name='Lesson number')),
                ('title', models.CharField(max_length=256, verbose_name='Name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Описание')),
                ('description_as_markdown', models.BooleanField(default=False, verbose_name='As markdown')),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mainapp.courses')),
            ],
            options={
                'ordering': ('course', 'num'),
            },
        ),
        migrations.CreateModel(
            name='CourseTeachers',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Создан')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Обновлён')),
                ('deleted', models.BooleanField(default=False, verbose_name='Удалён')),
                ('name_first', models.CharField(max_length=128, verbose_name='Имя')),
                ('name_second', models.CharField(max_length=128, verbose_name='Фамилия')),
                ('day_birth', models.DateField(verbose_name='Дата рождения')),
                ('course', models.ManyToManyField(to='mainapp.courses')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]

